﻿<?php
/**
 * Created by PhpStorm.
 * Date: 2018/4/23
 * Time: 下午10:32
 * qq: 1067713962
 */
namespace app\home\controller;
use think\Controller;
class Index extends Controller
{
    public function index()
    {
        echo 'ok';
        if (!session('user_id')) {
            $this->redirect('login/index');
        }
                $data = db('product')
                    ->where('product_status != 0')
                    ->where('is_miaofan', '0')
                    ->order('product_price asc')
                    ->select();
        $this->assign('data',$data);
        return view();
    }
       public function miaofan()
    {
        if (!session('user_id')) {
            $this->redirect('login/index');
        }
                $data = db('product')
                    ->where('product_status','1')
                    ->where('is_miaofan', '1')
                    ->order('product_price asc')
                    ->select();
        $this->assign('data',$data);
        return view();
    }
    public function jump()
    {
        return view();
    }
}


